package net.jacqeush.mini.rpc.config;

import java.util.concurrent.atomic.AtomicInteger;

/**
 * @author Jacquesh
 * @version 1.0
 * @date 2020/10/17 2:50
 */
public abstract class AbstractRpcConfig {
    private AtomicInteger generator = new AtomicInteger(0);
    protected String id;
    protected String interfaceClass = null;

    public String getId() {
        if(id.isEmpty()){
         this.id="jacques-huang-gen-id:"+generator.getAndIncrement();
        }
        return id;
    }

    public String getInterfaceClass() {
        return interfaceClass;
    }

    public void setInterfaceClass(String interfaceClass) {
        this.interfaceClass = interfaceClass;
    }
}
